home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-20 | 1.6 KB | 60 lines | [TEXT/ttxt] |
- global rgb:R[6],c:C
-
- on backToPict text -- text MUST have returns
- put the number of lines in text into vv
- put (the number of chars in line 1 of text)+1 into hh
- put charsHandle(text) into hand
- put hand@ into ptr
- repeat with v=1 to vv
- repeat with h=1 to hh
- put char 1 of pointer ptr into c -- HA! HA! Pointer Arithmatic!
- -- NEVER USE “IT” BECAUSE “IT” IS SLOWER THAN SLOW!!!!
- if c="•" then
- put 0 into rgb.integertype[1]
- put 0 into rgb.integertype[2]
- put 0 into rgb.integertype[3]
- setCPixel h,v,rgb
- add one to ptr
- next repeat
- end if
- if c="w" then
- -- asume already white, great speedup
- add one to ptr
- next repeat
- end if
- if c="r" then
- put 65535 into rgb.integertype[1]
- put 0 into rgb.integertype[2]
- put 0 into rgb.integertype[3]
- setCPixel h,v,rgb
- add one to ptr
- next repeat
- end if
- if c="g" then
- put 0 into rgb.integertype[1]
- put 65535 into rgb.integertype[2]
- put 0 into rgb.integertype[3]
- setCPixel h,v,rgb
- add one to ptr
- next repeat
- end if
- if c="b" then
- put 0 into rgb.integertype[1]
- put 0 into rgb.integertype[2]
- put 65535 into rgb.integertype[3]
- setCPixel h,v,rgb
- add one to ptr
- next repeat
- end if
- if c="y" then
- put 65535 into rgb.integertype[1]
- put 65535 into rgb.integertype[2]
- put 0 into rgb.integertype[3]
- setCPixel h,v,rgb
- add one to ptr
- next repeat
- end if
- add one to ptr
- end repeat
- end repeat
- end BackToPict